home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / OLE_Automation / frmTest.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-03-08  |  3.1 KB  |  105 lines

  1. VERSION 5.00
  2. Begin VB.Form frmTest 
  3.    Caption         =   "Test Network"
  4.    ClientHeight    =   3144
  5.    ClientLeft      =   9120
  6.    ClientTop       =   3288
  7.    ClientWidth     =   2172
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    PaletteMode     =   1  'UseZOrder
  11.    ScaleHeight     =   3144
  12.    ScaleWidth      =   2172
  13.    Begin VB.TextBox txtYInput 
  14.       Height          =   285
  15.       Left            =   840
  16.       TabIndex        =   3
  17.       Text            =   "0.0"
  18.       Top             =   960
  19.       Width           =   855
  20.    End
  21.    Begin VB.TextBox txtXInput 
  22.       Height          =   285
  23.       Left            =   840
  24.       TabIndex        =   0
  25.       Text            =   "0.0"
  26.       Top             =   480
  27.       Width           =   855
  28.    End
  29.    Begin VB.TextBox txtOutput 
  30.       Height          =   285
  31.       Left            =   720
  32.       TabIndex        =   2
  33.       Top             =   2400
  34.       Width           =   855
  35.    End
  36.    Begin VB.CommandButton cmdTest 
  37.       Caption         =   "Test"
  38.       Height          =   375
  39.       Left            =   240
  40.       TabIndex        =   1
  41.       Top             =   1560
  42.       Width           =   1695
  43.    End
  44.    Begin VB.Frame Frame1 
  45.       Caption         =   "Input"
  46.       Height          =   1335
  47.       Left            =   240
  48.       TabIndex        =   4
  49.       Top             =   120
  50.       Width           =   1695
  51.       Begin VB.Label lblY 
  52.          Caption         =   "Y"
  53.          Height          =   255
  54.          Left            =   240
  55.          TabIndex        =   6
  56.          Top             =   840
  57.          Width           =   375
  58.       End
  59.       Begin VB.Label lblX 
  60.          Caption         =   "X"
  61.          Height          =   255
  62.          Left            =   240
  63.          TabIndex        =   5
  64.          Top             =   360
  65.          Width           =   255
  66.       End
  67.    End
  68.    Begin VB.Frame Frame2 
  69.       Caption         =   "Output"
  70.       Height          =   855
  71.       Left            =   240
  72.       TabIndex        =   7
  73.       Top             =   2040
  74.       Width           =   1695
  75.    End
  76. Attribute VB_Name = "frmTest"
  77. Attribute VB_GlobalNameSpace = False
  78. Attribute VB_Creatable = False
  79. Attribute VB_PredeclaredId = True
  80. Attribute VB_Exposed = False
  81. Private Sub cmdTest_Click()
  82.     Dim NSApp As Object
  83.     Dim NSBB As Object
  84.     Dim outputArray As Variant
  85.     Dim finalOutput As Single
  86.     Dim inputArray(0 To 1, 0 To 0) As Variant
  87.     Dim inputArray2 As Variant
  88.         
  89.     Set NSApp = CreateObject("NeuroSolutions.Application")
  90.     Set NSBB = NSApp.activeBreadboard
  91.     inputArray(0, 0) = CSng(txtXInput.Text)
  92.     inputArray(1, 0) = CSng(txtYInput.Text)
  93.     inputArray2 = inputArray
  94.     NSBB.sendDataToEngine inputArray2, "oLEInput"
  95.     NSBB.send "control.resetNetwork()"
  96.     NSBB.send "control.runNetwork()"
  97.     outputArray = NSBB.send("trainingCostProbe.getProbeData()")
  98.     finalOutput = outputArray(0, 0)
  99.     txtOutput.Text = Format(finalOutput, "0.00000")
  100. End Sub
  101. Private Sub Label1_Click()
  102. End Sub
  103. Private Sub lblOutput_Click()
  104. End Sub
  105.